<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<%@ taglib tagdir="/WEB-INF/tags" prefix="matrix"%>
<%@ taglib uri="http://matrixcsm.zkingsoft.com" prefix="cms"%>
<cms:ads   code="'img_vrtvu0',
'ZY_KeHuZhuanQu_1',
'ZY_ZhengShuChaXun_2',
'ZY_NeiShenYuanChaXun_3',
'img_y$7BY4',
'ZY_DangQianWeiZhi_5',
'ZY_ShouYe_6',
'ZY_7_7',
'ZY_ZhengShuChaXun_8',
'ZY_ZhengShuChaXun_9',
'ZY_ChaXun_10',
'ZY_NeiShenYuanChaXun_11',
'ZY_ChaXun_12'"></cms:ads>
<!doctype html>
<!-- 客户专区 -->
<html>
 <head> 
  <meta charset="UTF-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1,"> 
  <link rel="icon" sizes="any" href="${浏览器logo}">
  <title>希尔梵${网页标题}</title> 
  <link rel="stylesheet" href="https://hwfile.csxuncong.com/xrfrz/new/pc/css/swiper-bundle.min.css"> 
  <link rel="stylesheet" href="https://hwfile.csxuncong.com/xrfrz/new/pc/css/animate.css"> 
  <link rel="stylesheet" href="https://hwfile.csxuncong.com/xrfrz/new/pc/css/common.css"> 
  <style>.box{ background: #F4F4F4; } .certificate-query{ background: #FFFFFF; padding: 80px 0; } .input-select{ width: 50%; margin-top: 24px; border-radius: 4px; background: #FFFFFF; box-sizing: border-box; border: 1px solid #CCCCCC; box-sizing: border-box; } .input-select input{ padding: 20px 24px; border: 0; background: transparent; font-size: 16px } .input-select input::placeholder { color: #cccccc; font-size: 16px; } .input-select .blue-btn{ color: #FFFFFF; font-size: 16px; padding: 22px 40px; background: #0EA8EE; cursor: pointer; } .certificate-query .select-warp{ padding-bottom: 40px; } .certificate-query .table-warp{ padding: 0 40px; margin-top: 40px; font-size: 16px; } .table-warp h2{ font-size: 24px; margin-top: 20px; margin-bottom: 20px; } .table-warp .table-header{ padding: 10px 0; border-top: 1px solid #eee; margin-top: 30px; } .table-warp table{ width: 100%; font-size: 14px; } table tr{ border-bottom: 1px solid #DDDDDD; } table tr:last-child{ border: none; } table tr:nth-child(odd){ background: #f7f7f7; } table th{ padding: 10px; background: #0EA8EE; color: #FFFFFF; } table td{ width: 25%; padding: 15px 5px; }</style> 
  <meta name="keywords" content="${网页关键词}">
  <meta name="description" content="${网页描述 }">
 </head> 
 <body> 
  <jsp:include page="_top.jsp"></jsp:include> 
  <div class="image-warp"> 
   <img src="${img_vrtvu0.adImg}" class="img zy" data-type="ad" data-id="${img_vrtvu0.adId}"> 
   <div class="page-name text-center"> 
    <h2 class="zy" data-type="ad" data-id="${ZY_KeHuZhuanQu_1.adId}">${ZY_KeHuZhuanQu_1.adTitle}</h2> 
   </div> 
  </div> 
  <div class="nav-container flex align-center"> 
   <div class="container flex align-center space-between"> 
    <div id="navHeader" class="nav flex align-center"> 
     <div class="nav-item zy" data-type="ad" data-id="${ZY_ZhengShuChaXun_2.adId}">
      ${ZY_ZhengShuChaXun_2.adTitle}
     </div> 
     <div class="nav-item zy" data-type="ad" data-id="${ZY_NeiShenYuanChaXun_3.adId}">
      ${ZY_NeiShenYuanChaXun_3.adTitle}
     </div> 
    </div> 
    <div class="current-location flex align-center"> 
     <img src="${img_y$7BY4.adImg}" class="zy" data-type="ad" data-id="${img_y$7BY4.adId}"> 
     <p> <span class="zy" data-type="ad" data-id="${ZY_DangQianWeiZhi_5.adId}">${ZY_DangQianWeiZhi_5.adTitle}</span> <a href="${ZY_ShouYe_6.adUrl}" class="zy" data-type="ad" data-id="${ZY_ShouYe_6.adId}">${ZY_ShouYe_6.adTitle}</a> <span class="zy" data-type="ad" data-id="${ZY_7_7.adId}">${ZY_7_7.adTitle}</span> <span class="color-white zy" data-type="ad" data-id="${ZY_ZhengShuChaXun_8.adId}">${ZY_ZhengShuChaXun_8.adTitle}</span> </p> 
    </div> 
   </div> 
  </div> 
  <div id="navContent"> 
   <div class="box hide"> 
    <div class="container"> 
     <div class="certificate-query"> 
      <div class="select-warp flex flex-v align-center"> 
       <p class="title zy" data-type="ad" data-id="${ZY_ZhengShuChaXun_9.adId}">${ZY_ZhengShuChaXun_9.adTitle}</p> 
       <div class="input-select flex align-center"> 
        <input class="flex-1" placeholder="请输入证书编号或企业名称" id="certificateNum"> 
        <div class="blue-btn zy" id="certificateSearch" data-type="ad" data-id="${ZY_ChaXun_10.adId}">
         ${ZY_ChaXun_10.adTitle}
        </div> 
       </div> 
      </div> 
      <div class="table-warp hide" id="certificateResult"></div> 
     </div> 
    </div> 
   </div> 
   <div class="box hide"> 
    <div class="container"> 
     <div class="certificate-query"> 
      <div class="select-warp flex flex-v align-center"> 
       <p class="title zy" data-type="ad" data-id="${ZY_NeiShenYuanChaXun_11.adId}">${ZY_NeiShenYuanChaXun_11.adTitle}</p> 
       <div class="input-select flex align-center"> 
        <input class="flex-1" placeholder="请输入证书编号或姓名" id="auditorNum"> 
        <div class="blue-btn zy" id="auditorSearch" data-type="ad" data-id="${ZY_ChaXun_12.adId}">
         ${ZY_ChaXun_12.adTitle}
        </div> 
       </div> 
      </div> 
      <div class="table-warp hide" id="auditorResult"></div> 
     </div> 
    </div> 
   </div> 
  </div> 
  <jsp:include page="_footer.jsp"></jsp:include>  
  <script src="https://hwfile.csxuncong.com/xrfrz/new/pc/js/swiper-bundle.min.js"></script> 
  <script src="https://hwfile.csxuncong.com/xrfrz/new/pc/js/wow.min.js"></script> 
  <script src="https://hwfile.csxuncong.com/xrfrz/new/pc/js/jquery.min.js"></script> 
  <script src="https://hwfile.csxuncong.com/xrfrz/new/pc/js/common.js"></script> 
  <script>
		function dateFormat(fmt, date){
			date = date ? new Date(date) : new Date()
			var ret;
			var opt = {
				"Y+": date.getFullYear().toString(),        // 年
				"m+": (date.getMonth() + 1).toString(),     // 月
				"d+": date.getDate().toString(),            // 日
				"H+": date.getHours().toString(),           // 时
				"M+": date.getMinutes().toString(),         // 分
				"S+": date.getSeconds().toString()          // 秒
			};
			var week = {
				"0": "\u65e5",
				"1": "\u4e00",
				"2": "\u4e8c",
				"3": "\u4e09",
				"4": "\u56db",
				"5": "\u4e94",
				"6": "\u516d"
			};
			if (/(W+)/.test(fmt)) {
				fmt = "星期" + week[date.getDay()];
			}
			// 处理ie不兼容padStart
			if(!String.prototype.padStart){
				String.prototype.padStart=function  padStart(targetLength,padString) {
					targetLength=targetLength >>0;
					padString=String(typeof padString!=='undefined'?padString:'');
					if(this.length>targetLength){
						return String(this);
					}else{
						targetLength=targetLength-this.length;
						if(targetLength>padString.length){
						padString+=padString.repeat(targetLength / padString.length)
						}
						return padString.slice(0,targetLength)+String(this)
					}
				}
			}
			for (var k in opt) {
				ret = new RegExp("(" + k + ")").exec(fmt);
				if (ret) {
					fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
				};
			};
			return fmt; 
		}

		$('#certificateSearch').click(function () {
			var val = $(this).prev().val()
			if(!val){
				alert('请输入证书编号或企业名称')
				return
			}
			$.ajax({ url: "http://www.xrfrz.com/do/queryCertificateByNameOrCode?condition="+val, type: 'get', success: function(res){
				if(res.status == 200) {
					var result = res.rows;
					var str = ''
					result.forEach(function(item){
						item.xcAwardDate = dateFormat('YYYY-mm-dd', item.xcAwardDate)
						item.xcExpireDate = dateFormat('YYYY-mm-dd', item.xcExpireDate)
						item.xcFirstDate = dateFormat('YYYY-mm-dd', item.xcFirstDate)
						item.xcReportDate = dateFormat('YYYY-mm-dd', item.xcReportDate)
						str += '<div class="table-header flex align-center space-between">  \
							<div class="flex align-center">  \
								<p>组织名称：</p>  \
								<p>'+item.xcOrgName+'</p>  \
							</div>  \
							<div class="flex align-center">  \
								<p>证书编号：</p>  \
								<p>'+item.xcCode+'</p>  \
							</div>  \
						</div>  \
						<div>  \
							<h2>'+item.xcOrgName+'</h2>  \
							<table>  \
								<tr><th colspan="4" class="text-left">证书信息</th></tr>  \
								<tr>  \
									<td>证书编号</td>  \
									<td>'+item.xcCode+'</td>  \
									<td>证书状态</td>  \
									<td>'+item.xcStatus+'</td>  \
								</tr>  \
								<tr>  \
									<td>颁证日期</td>  \
									<td>'+item.xcAwardDate+'</td>  \
									<td>证书到期日期</td>  \
									<td>'+item.xcExpireDate+'</td>  \
								</tr>  \
								<tr>  \
									<td>初次获证日期</td>  \
									<td>'+item.xcFirstDate+'</td>  \
									<td>信息上报日期</td>  \
									<td>'+item.xcReportDate+'</td>  \
								</tr>  \
								<tr>  \
									<td>认证项目</td>  \
									<td>'+item.xcProject+'</td>  \
									<td>认证依据</td>  \
									<td>'+item.xcBasis+'</td>  \
								</tr>  \
								<tr>  \
									<td>监督次数</td>  \
									<td>'+item.xcSuperviseNumber+'</td>  \
									<td>再认证次数</td>  \
									<td>'+item.xcReauthNumber+'</td>  \
								</tr>  \
								<tr>  \
									<td>认证覆盖的业务范围</td>  \
									<td>'+item.xcRange+'</td>  \
									<td>是否覆盖多场所</td>  \
									<td>'+(item.xcCoverMany==1?'是':'否')+'</td>  \
								</tr>  \
								<tr>  \
									<td>认证覆盖的场所名称及地址</td>  \
									<td>'+item.xcCoverAddress+'</td>  \
									<td>证书使用的认可标识</td>  \
									<td>'+item.xcUseSign+'</td>  \
								</tr>  \
								<tr><th colspan="4" class="text-left">获证组织基本信息</th></tr>  \
								<tr>  \
									<td>组织名称</td>  \
									<td>'+item.xcOrgName+'</td>  \
									<td>统一社会信用代码/组织机构代码</td>  \
									<td>'+item.xcOrgCode+'</td>  \
								</tr>  \
								<tr>  \
									<td>所在国别地区</td>  \
									<td>'+item.xcArea+'</td>  \
									<td>本证书体系覆盖人数</td>  \
									<td>'+item.xcPeopleNumber+'</td>  \
								</tr>  \
								<tr>  \
									<td>组织地址</td>  \
									<td>'+item.xcOrgAddress+'</td>  \
								</tr>  \
							</table>  \
						</div>'
					});
					$('#certificateResult').html(str).show()
				}
			}});
		})
		$('#auditorSearch').click(function () {
			var val = $(this).prev().val()
			if(!val){
				alert('请输入证书编号或姓名')
				return
			}
			$.ajax({ url: "http://www.xrfrz.com/do/queryNsyByNameOrCode?condition="+val, type: 'get', success: function(res){
				if(res.status == 200) {
					var result = res.mapInfo.orgInfo;
					result.nsyApplyDate = dateFormat('YYYY-mm-dd', result.nsyApplyDate)
					result.nsyExpireDate = dateFormat('YYYY-mm-dd', result.nsyExpireDate)
					var str = '<table> \
							<tr><th colspan="4" class="text-left">内审员信息</th></tr> \
							<tr> \
								<td>单位</td> \
								<td>'+result.nsyUnit+'</td> \
								<td>姓名</td> \
								<td>'+result.nsyName+'</td> \
							</tr> \
							<tr> \
								<td>性别</td> \
								<td>'+(result.nsySex==1?'男':'女')+'</td> \
								<td>身份证号码</td> \
								<td>'+result.nsyCard+'</td> \
							</tr> \
							<tr> \
								<td>管理体系类别</td> \
								<td>'+result.nsyType+'</td> \
								<td>证书编号</td> \
								<td>'+result.nsyNumber+'</td> \
							</tr> \
							<tr> \
								<td>发证日期</td> \
								<td>'+result.nsyApplyDate+'</td> \
								<td>有效日期</td> \
								<td>'+result.nsyExpireDate+'</td> \
							</tr> \
						</table>'
					$('#auditorResult').html(str).show()
				}
			}});
		})
		var navIndex = getQueryVariable('type') || 0;
		var val = getQueryVariable('keywords')
		if(navIndex) {
			$('#auditorNum').val(val)
			if(val) {
				$("#auditorSearch").trigger("click")
			}
		}else {
			$('#certificateNum').val(val)
			if(val) {
				$("#certificateSearch").trigger("click")
			}
		}
	</script> 
 </body>
</html>